|
LotusScript library: LSALibJanitor |
| Global variables |
Public Const VIEWNAME = "LSASysAllByUNID" Public DeleteFieldS = Variant Public isJanitorActivated = Integer
|
The janitor cleans up a document when a document goes to disk.
As there are often fields only for technical reasons like visibility
in the WEB it would optimize space on disk but also create a much
clearer data structure. As the fields may belong to various subforms
the Janitor collects its requests from various subforms, and bundles
them into one delete action.
The Janitor.cleanUp is used in the WEBQuerySaveAgent when running
for the web and in the QueryClose Event for the NotesClient. After all validations are sucessfully
done and the document finally goes to disk call the cleanup routine.
We can't call it in the QuerySave event, as this is also called for
intermediate saves and we must not destroy the fields as they may be
needed for further action. So we use the QueryClose and resave the
document from there. If the user doesn't want to save the QuerySave is
not executed and we have to suppress the Janitor.cleanup. Set the
global variable isJanitorActivated to true at successful end of
QuerySave .
- Author:
-
LPS EMEA
- Version:
-
2.1 13.SEP.2000
- History:
| 13.Sep.200 | RGR | make Janitor usable in QueryClose
|
| 27.JUL.2000 | ESc | previous Instancemanager functions copied
|
NoteFieldForDeletion
Public Sub NoteFieldForDeletion(Arr As Variant)
Arr may be an array of strings or a String
the fieldnames given in Arr are noted in a global array for later deletion
the routine is usually called in a Postopen.
- Parameters:
| arr | Variant | of strings requesting the field names to be deleted
|
- See also:
- History:
| 27.JUL.2000 | ESc | Same as function in previous Imgr
...
|
CleanUp
Public Sub CleanUp(Context As Variant)
deletes all Fields that have been noted from the document. Usually called in QueryClose or the WebQuerySave agent
Hint.
Must not be called in QuerySave as this would destroy the fields if it is only saved intermediately. and document is not closed.
- Parameters:
| Context | Variant | a notesDocument or a NotesUiDocument which gives the context
|
- See also:
- History:
| 13.SEP.2000 | RGR | in the case of a uidocument get the document from disk
|
| 27.JUL.2000 | ESc | renamed and added flexibility for context
|
Initialize
Public Sub Initialize
When the Janitor library is used, the default is that frondend documents
aren't cleaned up. Set isJanitorActivated = True in the QuerySave Event
when a document should be cleaned up in QueryClose. In QueryClose call the
CleanUp routine.
| Top | LotusScript Doc |
| © Lotus Professional Services |
| generated on : 05-Apr-01 10:01:44 AM |